next | previous | forward | backward | up | top | index | toc | home

Tally ^** ZZ -- Cartesian power of sets and tallies

Synopsis

Description

If A is a set, then so is B.
i1 : A = set {1,2}

o1 = set {1, 2}

o1 : Set
i2 : A^**3

o2 = set {(1, 1, 1), (1, 2, 1), (1, 1, 2), (2, 1, 1), (2, 2, 1), (1, 2, 2),
     ------------------------------------------------------------------------
     (2, 1, 2), (2, 2, 2)}

o2 : Set
i3 : A = tally {1,1,2}

o3 = Tally{1 => 2}
           2 => 1

o3 : Tally
i4 : A^**3

o4 = Tally{(1, 1, 1) => 8}
           (1, 1, 2) => 4
           (1, 2, 1) => 4
           (1, 2, 2) => 2
           (2, 1, 1) => 4
           (2, 1, 2) => 2
           (2, 2, 1) => 2
           (2, 2, 2) => 1

o4 : Tally

See also